include(${METADEF_DIR}/cmake/build_type.cmake)
add_library(ascir_register SHARED
        ascir_register.cc
        ascir_registry.cc
        )
target_clone_compile_and_link_options(graph_base ascir_register)
target_include_directories(ascir_register PUBLIC
        ${METADEF_DIR}/inc/external
        ${METADEF_DIR}/inc/graph
        ${METADEF_DIR}/inc
        ${METADEF_DIR}/inc/graph/utils)
target_link_libraries(ascir_register PRIVATE
        intf_pub
        -Wl,--no-as-needed
        $<$<NOT:$<STREQUAL:${TARGET_SYSTEM_NAME},Android>>:-lrt>
        -ldl
        graph
        PUBLIC
        metadef_headers)

add_library(ascir_generate SHARED
        generator.cc
        )
target_clone_compile_and_link_options(ascir_register ascir_generate)
target_link_libraries(ascir_generate PRIVATE
        intf_pub
        -Wl,--no-as-needed
        $<$<NOT:$<STREQUAL:${TARGET_SYSTEM_NAME},Android>>:-lrt>
        -ldl
        ascir_register
        PUBLIC
        metadef_headers)

add_executable(ascir_ops_header_generator ascir_ops_generator_main.cc)
target_link_libraries(ascir_ops_header_generator PRIVATE ascir_generate
        intf_pub
        -Wl,--no-as-needed
        $<$<NOT:$<STREQUAL:${TARGET_SYSTEM_NAME},Android>>:-lrt>
        -ldl
        c_sec
        static_mmpa)
include(generator.cmake)


